package com.yunpuvip.sachet.rest.common.vo;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @ClassName LoginVo
 * @Description TODO
 * @Autor wushaohong
 * @Date 2018/11/15
 * @Version 1.0
 */
@Data
public class LoginVo implements Serializable {
    @NotNull(message = "验证码不能为空")
    private String verifyCode;
    @NotNull(message = "姓名不能为空")
    private String name;
    @NotNull(message = "手机号码不能为空")
    @Pattern(regexp = "^(?:0|86|\\+86)?1[3456789]\\d{9}$"
            , message = "手机号格式错误")
    private String phoneNumber;

    //@NotNull(message = "微信openid不能为空")
    private String openid;

    @Override
    public String toString() {
        return "LoginVo{" +
                "verifyCode='" + verifyCode + '\'' +
                ", phoneNumber='" + phoneNumber + '\'' +
                ", openid='" + openid + '\'' +
                '}';
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getVerifyCode() {
        return verifyCode;
    }

    public void setVerifyCode(String verifyCode) {
        this.verifyCode = verifyCode;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }
}
